package com.zhuss.util;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.zhuss.common.SelectVo;
import com.zhuss.enums.Area;
import com.zhuss.enums.EnumUtil;
import com.zhuss.enums.Floor;
import com.zhuss.enums.Floor2;
import com.zhuss.enums.FoodTime;

public class FoodUtil {

	public static Map<String, Integer> getFloorMap(Integer area) {
		Map<String, Integer> floorMap = new HashMap<String, Integer>();
		List<SelectVo> result = null;
		if (Area.西区.sameKey(area)) {
			result = EnumUtil.listSelect(Floor.class);
		} else if (Area.东区.sameKey(area)) {
			result = EnumUtil.listSelect(Floor2.class);
		}
		for (SelectVo sv : result) {
			floorMap.put(sv.getName(), sv.getId());
		}
		return floorMap;
	}

	public static Map<String, Integer> getFoodTimeMap() {
		Map<String, Integer> foodTimeMap = new HashMap<String, Integer>();
		List<SelectVo> result = EnumUtil.listSelect(FoodTime.class);
		for (SelectVo sv : result) {
			foodTimeMap.put(sv.getName(), sv.getId());
		}
		return foodTimeMap;
	}

}
